import {
	myRequest
} from '@/utils/api.js'

import {
	encrypt
} from '@/utils/aes.js'
import config from 'config/env';
export const loginByUserName = (data) => {
	return myRequest({
		url: '/auth/token/login',
		method: 'get',
		data: data,
		showLoading: true
	});
}
export const loginByPhone = (data) => {
	return myRequest({
		url: '/auth/token/phome/login',
		method: 'get',
		data: data,
		showLoading: true
	});
}

export const getUserInfo = (data) => {
	return myRequest({
		url: '/upms/user/info',
		method: 'get',
		data: data,
		showLoading: true
	});
}

export const logout = () => {
	return myRequest({
		url: '/auth/token/logout',
		method: 'delete',
		showLoading: false
	});
}
export const getSmsCode = (phone) => {
	return myRequest({
		url: '/auth/phone/code',
		method: 'get',
		data: {
			phone
		},
		showLoading: true
	});
}
